package io.practiceAll;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class OIWAndISR {
    public static void main(String[] args) throws IOException{
      /*  FileOutputStream fileOutputStream = new FileOutputStream("stu.txt");
        OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream, StandardCharsets.UTF_8);
        outputStreamWriter.write("yj[yj[");
        outputStreamWriter.close();*/
        FileInputStream fileInputStream = new FileInputStream("stu.txt");
        InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream,StandardCharsets.UTF_8);
        int a;
        while ((a=inputStreamReader.read())!=-1){
            System.out.print((char)a);
        }

       inputStreamReader.close();
    }
}
